Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve resizing log message #1939

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

georgwiese
Copy link
Collaborator

With this change, we check the fraction of used rows in each machine. If the fraction is above 50%, we don't log anything in INFO level, otherwise, we suggest that the machines could be configured with a smaller min_degree.

This is not a warning, because on some backends, it might not be possible to use VADCOP.

Example:

$ cargo run pil test_data/std/poseidon_gl_test.asm -o output -f
...
Only 101 / 256 rows are used in machine Main Machine, which is configured to support sizes in the range 256..256. If the backend supports it, consider lowering the min_degree.

@georgwiese georgwiese marked this pull request as ready for review October 23, 2024 10:39
@Schaeff Schaeff requested a review from chriseth October 23, 2024 13:29
@@ -214,3 +215,34 @@ impl<'a, T: FieldElement> MachineParts<'a, T> {
self.fixed_data.column_name(poly_id)
}
}

/// The minimum size for which a warning is logged if the used rows are less than half of the size.
/// This number coincides with 2**powdr_linker::MIN_DEGREE_LOG.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't because there is no static_assert.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it important that it does?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not really important. If the total number of rows, the overhead of proving them becomes negligible and the log would just be noise. Arguably 32 is a already very small.
If this number was below 2**powdr_linker::MIN_DEGREE_LOG, we'd get the log message often, that's why I chose it to be equal.

Yesterday, we also discussed with Thibaut and Leo that we want to remove MIN_DEGREE_LOG and let the user always be explicit about the min degree. Then, this comment goes away.

Comment on lines 232 to 237
"Only {} / {} rows are used in machine {}, which is configured to support sizes in the range {}..{}. If the backend supports it, consider lowering the min_degree.",
used_rows,
size,
name,
degree_range.min,
degree_range.max,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"Only {} / {} rows are used in machine {}, which is configured to support sizes in the range {}..{}. If the backend supports it, consider lowering the min_degree.",
used_rows,
size,
name,
degree_range.min,
degree_range.max,
"Only {used_rows} of {size} rows are used in machine '{name}', which is configured to support sizes in the range {degree_range}. If the backend supports it, consider lowering the min_degree.",

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should also say what the actual probleme here is. I'm not sure, but I guess that the machine could be sized down, but min_degree prevents the size being reduced?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, added that! Also logging the percentage now and mention that the goal should be to be at least at 50%.

georgwiese and others added 2 commits October 25, 2024 11:06
Co-authored-by: chriseth <chris@ethereum.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants